Termination w.r.t. Q of the following Term Rewriting System could not be shown:
Q restricted rewrite system:
The TRS R consists of the following rules:
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X
Q is empty.
↳ QTRS
↳ DependencyPairsProof
Q restricted rewrite system:
The TRS R consists of the following rules:
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X
Q is empty.
Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:
PRIMES → S(0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
PRIMES → S(s(0))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__filter(X1, X2)) → FILTER(activate(X1), activate(X2))
IF(true, X, Y) → ACTIVATE(X)
FILTER(s(s(X)), cons(Y, Z)) → IF(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
ACTIVATE(n__from(X)) → FROM(activate(X))
ACTIVATE(n__s(X)) → S(activate(X))
PRIMES → SIEVE(from(s(s(0))))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
PRIMES → FROM(s(s(0)))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
SIEVE(cons(X, Y)) → CONS(X, n__filter(X, n__sieve(activate(Y))))
IF(false, X, Y) → ACTIVATE(Y)
FROM(X) → CONS(X, n__from(n__s(X)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(X)) → SIEVE(activate(X))
ACTIVATE(n__cons(X1, X2)) → CONS(activate(X1), X2)
ACTIVATE(n__s(X)) → ACTIVATE(X)
TAIL(cons(X, Y)) → ACTIVATE(Y)
The TRS R consists of the following rules:
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ EdgeDeletionProof
Q DP problem:
The TRS P consists of the following rules:
PRIMES → S(0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
PRIMES → S(s(0))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__filter(X1, X2)) → FILTER(activate(X1), activate(X2))
IF(true, X, Y) → ACTIVATE(X)
FILTER(s(s(X)), cons(Y, Z)) → IF(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
ACTIVATE(n__from(X)) → FROM(activate(X))
ACTIVATE(n__s(X)) → S(activate(X))
PRIMES → SIEVE(from(s(s(0))))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
PRIMES → FROM(s(s(0)))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
SIEVE(cons(X, Y)) → CONS(X, n__filter(X, n__sieve(activate(Y))))
IF(false, X, Y) → ACTIVATE(Y)
FROM(X) → CONS(X, n__from(n__s(X)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(X)) → SIEVE(activate(X))
ACTIVATE(n__cons(X1, X2)) → CONS(activate(X1), X2)
ACTIVATE(n__s(X)) → ACTIVATE(X)
TAIL(cons(X, Y)) → ACTIVATE(Y)
The TRS R consists of the following rules:
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ EdgeDeletionProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
PRIMES → S(0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
PRIMES → S(s(0))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__filter(X1, X2)) → FILTER(activate(X1), activate(X2))
IF(true, X, Y) → ACTIVATE(X)
FILTER(s(s(X)), cons(Y, Z)) → IF(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
ACTIVATE(n__from(X)) → FROM(activate(X))
ACTIVATE(n__s(X)) → S(activate(X))
PRIMES → SIEVE(from(s(s(0))))
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
SIEVE(cons(X, Y)) → CONS(X, n__filter(X, n__sieve(activate(Y))))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
PRIMES → FROM(s(s(0)))
IF(false, X, Y) → ACTIVATE(Y)
FROM(X) → CONS(X, n__from(n__s(X)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(X)) → SIEVE(activate(X))
TAIL(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__cons(X1, X2)) → CONS(activate(X1), X2)
The TRS R consists of the following rules:
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 13 less nodes.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ EdgeDeletionProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(X1, X2)) → FILTER(activate(X1), activate(X2))
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(X)) → SIEVE(activate(X))
ACTIVATE(n__s(X)) → ACTIVATE(X)
The TRS R consists of the following rules:
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X
Q is empty.
We have to consider all minimal (P,Q,R)-chains.